"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkStaticFile = void 0;
const path = require("path");
const fs = require("fs");
function checkStaticFile(app, pathname) {
    if (!app.StaticDir) {
        return false;
    }
    if (!fs.existsSync(app.StaticDir)) {
        return false;
    }
    if (!fs.statSync(app.StaticDir).isDirectory()) {
        return false;
    }
    let staticFilePath = path.join(app.StaticDir, pathname);
    if (!fs.existsSync(staticFilePath)) {
        return false;
    }
    if (fs.statSync(staticFilePath).isFile()) {
        return staticFilePath;
    }
}
exports.checkStaticFile = checkStaticFile;
